package JavaHomework02;

import java.util.Random;

public class zuoye04 {
	public static void main(String[] args) {
		int[] [] arr={{1,2},{3,4,5,6},{7,8,9,10}};
		Random r=new Random();
		
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				int a = r.nextInt(arr.length-1);
				int b = r.nextInt(arr[a].length-1);
				
				int temp = arr[i][j];
				arr[i][j] =arr[a][b];
				arr[a][b] = temp;
			}
		}
		
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+",");
			}
		}
	}
}
